package com.geeke.org.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.geeke.common.persistence.TreeEntity;
import com.geeke.sys.entity.User;
import java.util.*;

/**
 * 公司Entity
 * 
 * 重要说明：
 *   如果表中包含name或remarks字段，必须在实体类中显式定义name或remarks属性。
 *   这些字段的属性已经包含在基类中，无需在实体类定义：id, createBy, createDate, updateBy, updateDate, delFlag, parent, ids, sort
 */
public class Company extends TreeEntity<Company> {

    private static final long serialVersionUID = 1L;
    
    // Constructor
    public Company() {
        super();
    }
    
    public Company(String id) {
        super(id);
    }

    @NotBlank(message = "编号不能为空")
    @Length(min = 1, max = 64, message = "编号长度必须介于1和64之间")
    private String code; // 编号

    @NotBlank(message = "全称不能为空")
    @Length(min = 1, max = 512, message = "全称长度必须介于1和512之间")
    private String fullName; // 全称

    @NotBlank(message = "名称不能为空")
    @Length(min = 1, max = 128, message = "名称长度必须介于1和128之间")
    private String name; // 名称

    private User chairman; // 董事长

    private User manager; // 总经理

    @Length(min = 0, max = 255, message = "备注信息长度必须介于0和255之间")
    private String remarks; // 备注信息

    // Getters and setters
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User getChairman() {
        return chairman;
    }

    public void setChairman(User chairman) {
        this.chairman = chairman;
    }

    public User getManager() {
        return manager;
    }

    public void setManager(User manager) {
        this.manager = manager;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }


    public String getTableAlias() {
        return "company";
    }
} 